package com.asofdate.sql;

/**
 * Created by hzwy23 on 2017/5/16.
 */
public class SqlDefine {
    public static String sys_rdbms_001 = "select user_id,user_passwd,status_id,continue_error_cnt from sys_sec_user where user_id = ?";
    public static String sys_rdbms_002 = "select t.domain_id from sys_org_info t where t.org_unit_id  = ?";
    public static String sys_rdbms_003 = "select i.domain_id from sys_user_info t inner join sys_org_info i on t.org_unit_id = i.org_unit_id where t.user_id = ?";
    public static String sys_rdbms_004 = "select domain_id from sys_role_info where role_id = ?";
    public static String sys_rdbms_005 = "update sys_resource_info set res_name = ?, res_up_id = ? where res_id = ?";
    public static String sys_rdbms_006 = "select count(*) from sys_theme_value where theme_id = ? and res_id = ?";
    public static String sys_rdbms_007 = "delete from sys_user_info where user_id = ? and org_unit_id = ?";
    public static String sys_rdbms_008 = "insert into sys_theme_value(uuid,theme_id,res_id,res_url,res_type,res_bg_color,res_class,group_id,res_img,sort_id) value(uuid(),?,?,?,?,?,?,?,?,?)";
    public static String sys_rdbms_009 = "update sys_theme_value set res_url = ?, res_bg_color = ?, res_class = ?, res_img = ?, group_id = ?, sort_id = ?, res_type = ? where theme_id = ? and res_id = ?";
    public static String sys_rdbms_010 = "select authorization_level from sys_domain_share_info where domain_id = ? and target_domain_id = ?";
    public static String sys_rdbms_011 = "select distinct t2.res_url from sys_user_theme t1 inner join sys_theme_value t2 on t1.theme_id = t2.theme_id inner join sys_resource_info t3 on t2.res_id = t3.res_id where t1.user_id = ? and t2.res_id = ? and t3.res_type = '0'";
    public static String sys_rdbms_012 = "select uuid,user_id,handle_time,client_ip,status_code,method,url,data from sys_handle_logs t where t.domain_id = ? order by handle_time desc";
    public static String sys_rdbms_013 = "select res_type from sys_resource_info where res_id = ?";
    public static String sys_rdbms_014 = "update sys_sec_user set user_passwd = ? where user_id = ? and user_passwd = ?";
    public static String sys_rdbms_015 = "update sys_sec_user set user_passwd = ? where user_id = ?";
    public static String sys_rdbms_016 = "update sys_sec_user set status_id = ? ,continue_error_cnt = '0' where user_id = ?";
    public static String sys_rdbms_017 = "select t.user_id,t.user_name,a.status_desc,t.user_create_date as create_date, t.user_owner as create_user,t.user_email,t.user_phone,i.org_unit_id,i.org_unit_desc, di.domain_id,di.domain_name,t.user_maintance_date as modify_date,t.user_maintance_user as modify_user,u.status_id as status_cd from sys_user_info t inner join sys_sec_user u on t.user_id = u.user_id inner join sys_user_status_attr a on u.status_id = a.status_id inner join sys_org_info i on i.org_unit_id = t.org_unit_id inner join sys_domain_info di on i.domain_id = di.domain_id where di.domain_id = ?";
    public static String sys_rdbms_018 = "insert into sys_user_info (user_id,user_name,user_create_date,user_owner,user_email,user_phone,org_unit_id,user_maintance_date,user_maintance_user) values(?,?,now(),?,?,?,?,now(),?)";
    public static String sys_rdbms_019 = "insert into sys_sec_user(user_id,user_passwd,status_id) values(?,?,?)";
    public static String sys_rdbms_020 = "update sys_sec_user set user_passwd = ? where user_id = ?";
    public static String sys_rdbms_021 = "update sys_user_info t set t.user_name = ?, t.user_phone = ?, t.user_email = ? ,t.user_maintance_date = now(), t.user_maintance_user = ?,t.org_unit_id = ? where t.user_id = ?";
    public static String sys_rdbms_022 = "select count(*) from sys_role_user_relation r inner join sys_role_resource_relat e on r.role_id = e.role_id inner join sys_theme_value v on e.res_id = v.res_id inner join sys_user_theme m on v.theme_id = m.theme_id and r.user_id = m.user_id where r.user_id = ? and v.res_url = ?";
    public static String sys_rdbms_023 = "select t.user_id,t.user_name,a.status_desc,t.user_create_date, t.user_owner,t.user_email,t.user_phone,i.org_unit_id,i.org_unit_desc,di.domain_id,di.domain_name,t.user_maintance_date,t.user_maintance_user,u.status_id from sys_user_info t inner join sys_sec_user u on t.user_id = u.user_id inner join sys_user_status_attr a on u.status_id = a.status_id inner join sys_org_info i on i.org_unit_id = t.org_unit_id inner join sys_domain_info di on i.domain_id = di.domain_id where t.user_id = ?";
    public static String sys_rdbms_024 = "update sys_user_theme set theme_id = ? where user_id = ?";
    public static String sys_rdbms_025 = "select t.domain_id, t.domain_name as domain_desc, s.domain_status_name  as domain_status_desc, t.domain_create_date as maintance_date , t.domain_owner as create_user_id,t.domain_maintance_date as domain_modify_date,t.domain_maintance_user as domain_modify_user,t.domain_status_id as domain_status_cd from sys_domain_info t inner join sys_domain_status_attr s on t.domain_status_id = s.domain_status_id";
    public static String sys_rdbms_026 = "insert into sys_role_info(role_id,role_name,role_owner,role_create_date,role_status_id,domain_id,role_maintance_date,role_maintance_user,code_number) values(?,?,?,now(),?,?,now(),?,?)";
    public static String sys_rdbms_027 = "delete from sys_role_info where role_id = ? and domain_id = ?";
    public static String sys_rdbms_028 = "select t.code_number,t.role_name,t.role_owner as create_user,t.role_create_date as create_date,a.role_status_desc,a.role_status_id as role_status_code,t.domain_id,o.domain_name as domain_desc,t.role_maintance_date as modify_date,t.role_maintance_user as modify_user,t.role_id from sys_role_info t inner join sys_role_status_attr a on t.role_status_id = a.role_status_id inner join sys_domain_info o on t.domain_id = o.domain_id where t.domain_id = ?";
    public static String sys_rdbms_029 = "select uuid,user_id,handle_time,client_ip,status_code,method,url,data from sys_handle_logs t where t.domain_id = ? order by handle_time desc limit ?,?";
    public static String sys_rdbms_030 = "select count(*) from sys_handle_logs t where t.domain_id = ?";
    public static String sys_rdbms_031 = "select uuid,user_id,handle_time,client_ip,status_code,method,url,data from sys_handle_logs t where t.domain_id = ? and user_id = ? and handle_time >= str_to_date(?,'%Y-%m-%d') and handle_time < str_to_date(?,'%Y-%m-%d') order by handle_time desc";
    public static String sys_rdbms_032 = "select uuid,user_id,handle_time,client_ip,status_code,method,url,data from sys_handle_logs t where t.domain_id = ? and user_id = ? and handle_time >= str_to_date(?,'%Y-%m-%d') order by handle_time desc";
    public static String sys_rdbms_033 = "select uuid,user_id,handle_time,client_ip,status_code,method,url,data from sys_handle_logs t where t.domain_id = ? and handle_time >= str_to_date(?,'%Y-%m-%d') and handle_time < str_to_date(?,'%Y-%m-%d') order by handle_time desc";
    public static String sys_rdbms_034 = "select domain_id from sys_domain_share_info t where t.target_domain_id = ?";
    public static String sys_rdbms_035 = "select uuid,user_id,handle_time,client_ip,status_code,method,url,data from sys_handle_logs t where t.domain_id = ? and handle_time >= str_to_date(?,'%Y-%m-%d') order by handle_time desc";
    public static String sys_rdbms_036 = "insert into sys_domain_info(domain_id,domain_name,domain_status_id,domain_create_date,domain_owner,domain_maintance_date,domain_maintance_user) values(?,?,?,now(),?,now(),?)";
    public static String sys_rdbms_037 = "delete from sys_domain_info where domain_id = ?";
    public static String sys_rdbms_038 = "update sys_domain_info set domain_name = ?, domain_status_id = ?, domain_maintance_date = now(), domain_maintance_user = ? where domain_id = ?";
    public static String sys_rdbms_039 = "select uuid,user_id,handle_time,client_ip,status_code,method,url,data from sys_handle_logs t where t.domain_id = ? and handle_time < str_to_date(?,'%Y-%m-%d') order by handle_time desc";
    public static String sys_rdbms_040 = "select uuid,user_id,handle_time,client_ip,status_code,method,url,data from sys_handle_logs t where t.domain_id = ? and user_id = ? order by handle_time desc";
    public static String sys_rdbms_041 = "select org_unit_id as org_id,org_unit_desc as org_desc,up_org_id,t.domain_id,create_date,maintance_date as modify_date,create_user,maintance_user as modify_user,code_number from sys_org_info t where t.domain_id = ?";
    public static String sys_rdbms_042 = "select uuid,user_id,handle_time,client_ip,status_code,method,url,data from sys_handle_logs t where t.domain_id = ? order by user_id,handle_time desc";
    public static String sys_rdbms_043 = "insert into sys_org_info(code_number,org_unit_desc,up_org_id,domain_id,create_date,maintance_date,create_user,maintance_user,org_unit_id) values(?,?,?,?,now(),now(),?,?,?)";
    public static String sys_rdbms_044 = "delete from sys_org_info where org_unit_id = ? and domain_id = ?";
    public static String sys_rdbms_045 = "insert into sys_user_theme(user_id,theme_id) values(?,?)";
    public static String sys_rdbms_046 = "select t.role_id,t.role_name,t.code_number from sys_role_info t where ( t.role_owner = ? or exists ( select 1 from sys_role_user_relation r where r.user_id = ? and t.role_id = r.role_id ))";
    public static String sys_rdbms_047 = "";
    public static String sys_rdbms_048 = "insert into sys_role_user_relation(uuid,role_id,user_id,maintance_date,maintance_user) values(uuid(),?,?,now(),?)";
    public static String sys_rdbms_050 = "update sys_role_info t set t.role_name = ? ,t.role_status_id = ?, role_maintance_date = now(), role_maintance_user = ? where t.role_id = ?";
    public static String sys_rdbms_069 = "update sys_org_info set org_unit_desc = ? ,up_org_id = ?, maintance_date = now(),maintance_user=? where org_unit_id = ?";
    public static String sys_rdbms_070 = "select t.theme_id,i.theme_desc, res_id,res_url,res_type,res_bg_color,res_class,group_id,res_img,sort_id from sys_theme_value t left join sys_theme_info i on t.theme_id = i.theme_id where t.theme_id = ? and t.res_id = ?";
    public static String sys_rdbms_071 = "select t.res_id,t.res_name,t.res_attr, a.res_attr_desc,t.res_up_id,t.res_type,r.res_type_desc,t.sys_flag from sys_resource_info t inner join sys_resource_info_attr a on t.res_attr = a.res_attr inner join sys_resource_type_attr r on t.res_type = r.res_type";
    public static String sys_rdbms_072 = "insert into sys_resource_info(res_id,res_name,res_attr,res_up_id,res_type) values(?,?,?,?,?)";
    public static String sys_rdbms_073 = "select t.id,d.up_id from dispatch_batch_group_relation t inner join dispatch_group_dependency d on t.id = d.id where t.batch_id = ?";
    public static String sys_rdbms_074 = "insert into sys_role_resource_relat(uuid,role_id,res_id) values(?,?,?)";
    public static String sys_rdbms_075 = "select t.id, d.up_id from dispatch_group_task_relation t inner join  dispatch_task_dependency d on t.id = d.id where t.group_id = ?";
    public static String sys_rdbms_076 = "delete from sys_theme_value where res_id = ?";
    public static String sys_rdbms_077 = "delete from sys_resource_info where res_id = ? and sys_flag is null";
    public static String sys_rdbms_078 = "select t1.res_url from sys_index_page t1 inner join sys_user_theme t2 on t1.theme_id = t2.theme_id where t2.user_id = ?";
    public static String sys_rdbms_079 = "select distinct domain_id from sys_user_info i inner join sys_org_info o on i.org_unit_id = o.org_unit_id where user_id = ?";
    public static String sys_rdbms_080 = "select o.org_unit_id from sys_user_info i inner join sys_org_info o on i.org_unit_id = o.org_unit_id where user_id = ?";
    public static String sys_rdbms_083 = "select t.uuid,t.target_domain_id,i.domain_name,t.authorization_level,t.create_user,t.create_date,t.modify_user,t.modify_date from sys_domain_share_info t inner join sys_domain_info i on t.target_domain_id = i.domain_id where t.domain_id = ?";
    public static String sys_rdbms_084 = "select t.domain_id, t.domain_name as domain_desc, s.domain_status_name  as domain_status_desc, t.domain_create_date  as maintance_date, t.domain_owner as create_user_id,t.domain_maintance_date as domain_modify_date,t.domain_maintance_user as domain_modify_user from sys_domain_info t inner join sys_domain_status_attr s  on t.domain_status_id = s.domain_status_id where t.domain_id = ?";
    public static String sys_rdbms_085 = "select t.domain_id, t.domain_name from sys_domain_info t where not exists ( select 1 from sys_domain_share_info i where t.domain_id = i.target_domain_id and i.domain_id = ? ) and t.domain_id <> ?";
    public static String sys_rdbms_086 = "insert into sys_domain_share_info(uuid,domain_id,target_domain_id,authorization_level,create_user,create_date,modify_date,modify_user) values(uuid(),?,?,?,?,now(),now(),?)";
    public static String sys_rdbms_087 = "delete from sys_domain_share_info where uuid = ?";
    public static String sys_rdbms_088 = "update sys_domain_share_info set authorization_level = ?,modify_user = ? , modify_date = now() where uuid = ?";
    public static String sys_rdbms_089 = "select t.res_id,t.res_name,t.res_attr, a.res_attr_desc,t.res_up_id,t.res_type,r.res_type_desc from sys_resource_info t inner join sys_resource_info_attr a on t.res_attr = a.res_attr inner join sys_resource_type_attr r on t.res_type = r.res_type where res_id = ?";
    public static String sys_rdbms_093 = "delete from sys_role_resource_relat where role_id = ? and res_id = ?";
    public static String sys_rdbms_094 = "select r.user_id, t.role_id, t.code_number,t.role_name,t.role_status_id from sys_role_info t inner join sys_role_user_relation r on t.role_id = r.role_id where r.user_id = ? and t.role_status_id = '0'";
    public static String sys_rdbms_095 = "select t.role_id,t.code_number,t.role_name from sys_user_info i inner join sys_org_info o on i.org_unit_id = o.org_unit_id inner join sys_role_info t on o.domain_id = t.domain_id where i.user_id = ? and t.role_status_id = '0' and  not exists ( select 1 from sys_role_user_relation r where i.user_id = r.user_id and r.role_id = t.role_id )";
    public static String sys_rdbms_096 = "insert into sys_role_user_relation(uuid,role_id,user_id,maintance_date,maintance_user) values(?,?,?,now(),?)";
    public static String sys_rdbms_097 = "delete from sys_role_user_relation where uuid = ?";
    public static String sys_rdbms_098 = "update sys_sec_user set continue_error_cnt = ? where user_id = ?";
    public static String sys_rdbms_099 = "update sys_sec_user set status_id = 1 where user_id = ?";
    public static String sys_rdbms_100 = "select role_id,res_id from sys_role_resource_relat where role_id = ?";
    public static String sys_rdbms_101 = "select t.theme_id,i.theme_desc,res_id,res_url,res_type,res_bg_color,res_class,group_id,res_img,sort_id from sys_theme_value t inner join sys_theme_info i on t.theme_id = i.theme_id where t.theme_id = ? order by group_id,sort_id asc";
    public static String sys_rdbms_102 = "select as_of_date from dispatch_batch_define where batch_id = ? and complete_date >= as_of_date";
    public static String sys_rdbms_103 = "select theme_id from sys_user_theme where user_id = ?";
    public static String sys_rdbms_104 = "select t.arg_id, t.arg_type,a.arg_type_desc,t.arg_value,t.code_number,t.create_user,t.create_date,t.modify_user,t.modify_date,t.domain_id,t.arg_desc,t.bind_as_of_date from dispatch_argument_define t left join dispatch_argument_type_attr a on t.arg_type = a.arg_type where t.domain_id = ?";
    public static String sys_rdbms_105 = "select t.uuid,t.batch_id,t.arg_id,t.arg_value,t.domain_id from dispatch_batch_argument_rel t where t.domain_id = ?";
    public static String sys_rdbms_106 = "select t.id as uuid,t.batch_id,t.group_id,t.domain_id from dispatch_batch_group_relation t where t.domain_id = ?";
    public static String sys_rdbms_107 = "select t.batch_id,t.code_number,t.batch_desc,t.batch_status, t.as_of_date,t.start_date,t.ret_msg, t.complete_date, t.end_date,t.domain_id,a.batch_status_desc,t.pagging_freq,t.pagging_freq_mult,r.pagging_freq_mult_desc from dispatch_batch_define t inner join dispatch_batch_status_attr a on t.batch_status = a.batch_status inner join dispatch_batch_pagging_attr r on t.pagging_freq_mult = r.pagging_freq_mult where t.domain_id = ?";
    public static String sys_rdbms_108 = "select t.group_id,t.code_number,t.group_desc,t.create_user,t.create_date,t.modify_user,t.modify_date,t.domain_id from dispatch_group_define t where t.domain_id = ?";
    public static String sys_rdbms_109 = "select t.id as uuid,t.group_id,t.task_id,t.domain_id from dispatch_group_task_relation t where t.domain_id = ?";
    public static String sys_rdbms_110 = "select t.uuid,t.task_id,t.arg_id,t.arg_value,t.domain_id,t.sort_id from dispatch_task_argument_rel t where t.domain_id = ?";
    public static String sys_rdbms_111 = "select t.task_id,t.code_number,t.task_desc,t.task_type,a.task_type_desc,t.create_user,t.create_date,t.modify_date,t.modify_user,t.domain_id,t.script_file from dispatch_task_define t inner join dispatch_task_type_attr a on t.task_type = a.task_type where t.domain_id = ?";
    public static String sys_rdbms_112 = "select uuid,id,up_id,domain_id from dispatch_group_dependency where domain_id = ?";
    public static String sys_rdbms_113 = "select uuid,id,up_id,domain_id from dispatch_task_dependency where domain_id = ?";
    public static String sys_rdbms_114 = "select uuid,id,arg_id,arg_value,domain_id from dispatch_group_argument_rel where domain_id = ?";
    public static String sys_rdbms_115 = "select distinct r.res_id from sys_role_user_relation t inner join sys_role_resource_relat r on t.role_id = r.role_id where t.user_id = ?";
    public static String sys_rdbms_116 = "select uuid,domain_id,target_domain_id,authorization_level from sys_domain_share_info where target_domain_id = ?";
    public static String sys_rdbms_117 = "select uuid,domain_id,target_domain_id,authorization_level from sys_domain_share_info where domain_id = ?";
    public static String sys_rdbms_118 = "select t.domain_id,t.domain_name as domain_desc,t.domain_status_id,a.domain_status_name as domain_status_desc from sys_domain_info t inner join sys_domain_status_attr a on t.domain_status_id = a.domain_status_id";
    public static String sys_rdbms_119 = "insert into dispatch_argument_define(arg_id,arg_type,arg_value,code_number,create_user,create_date,modify_user,modify_date,domain_id,arg_desc,bind_as_of_date) values(?,?,?,?,?,now(),?,now(),?,?,?)";
    public static String sys_rdbms_120 = "delete from dispatch_argument_define where arg_id = ? and domain_id = ?";
    public static String sys_rdbms_121 = "update dispatch_argument_define set modify_user = ?, modify_date = now(), bind_as_of_date = ?, arg_desc = ?, arg_value = ? where arg_id = ? and domain_id = ?";
    public static String sys_rdbms_122 = "delete from dispatch_group_define where group_id = ? and domain_id = ?";
    public static String sys_rdbms_123 = "update dispatch_group_define set group_desc = ? where group_id = ? and domain_id = ?";
    public static String sys_rdbms_124 = "insert into dispatch_group_define(group_id,code_number,group_desc,create_user,create_date,modify_user,modify_date,domain_id) values(?,?,?,?,now(),?,now(),?)";
    public static String sys_rdbms_125 = "insert into dispatch_task_define(task_id,code_number,task_desc,task_type,create_user,create_date,modify_date,modify_user,domain_id,script_file) values(?,?,?,?,?,now(),now(),?,?,?)";
    public static String sys_rdbms_126 = "update dispatch_task_define set task_desc = ?, task_type = ?,script_file = ? where task_id = ? and domain_id = ?";
    public static String sys_rdbms_127 = "delete from dispatch_task_define where task_id = ? and domain_id = ?";
    public static String sys_rdbms_128 = "insert into dispatch_batch_define(batch_id,code_number,batch_desc,batch_status,as_of_date,ret_msg,complete_date,domain_id,pagging_freq,pagging_freq_mult) values(?,?,?,?,?,?,?,?,?,?)";
    public static String sys_rdbms_129 = "delete from dispatch_batch_define where batch_id = ? and domain_id = ?";
    public static String sys_rdbms_130 = "update dispatch_batch_define set batch_desc = ?, as_of_date = ? , complete_date = ?,pagging_freq = ?, pagging_freq_mult = ? where batch_id = ? and domain_id = ?";
    public static String sys_rdbms_131 = "select batch_status from dispatch_batch_define where batch_id = ?";
    public static String sys_rdbms_132 = "select t.uuid,t.task_id,t.arg_id,t.arg_value,t.sort_id,t.domain_id,d.arg_type,a.arg_type_desc,d.arg_desc,d.code_number,d.arg_value as fixed_arg_value from dispatch_task_argument_rel t inner join dispatch_argument_define d on t.arg_id = d.arg_id inner join dispatch_argument_type_attr a on d.arg_type = a.arg_type where t.task_id = ? order by sort_id asc";
    public static String sys_rdbms_133 = "select t.id,t.group_id,t.task_id,t.domain_id,d.task_desc,d.task_type,a.task_type_desc,d.code_number from dispatch_group_task_relation t inner join dispatch_task_define d on t.task_id = d.task_id inner join dispatch_task_type_attr a on d.task_type = a.task_type where t.group_id = ?";
    public static String sys_rdbms_134 = "select t.uuid,t.id,t.up_id,t.domain_id,r.group_id,r.task_id,d.task_desc,d.code_number from dispatch_task_dependency t inner join dispatch_group_task_relation r on t.up_id = r.id inner join dispatch_task_define d on r.task_id = d.task_id where t.id = ?";
    public static String sys_rdbms_135 = "select t.id,t.arg_id,t.arg_value,t.domain_id,r.group_id,r.task_id from dispatch_group_argument_rel t inner join dispatch_group_task_relation r on t.id = r.id where t.id = ?";
    public static String sys_rdbms_136 = "select t.task_id from dispatch_group_task_relation t where t.id = ?";
    public static String sys_rdbms_137 = "select t.id,t.batch_id,t.group_id,t.domain_id,d.group_desc,d.code_number from dispatch_batch_group_relation t inner join dispatch_group_define d on t.group_id = d.group_id where batch_id = ?";
    public static String sys_rdbms_138 = "select t.uuid,t.id,t.up_id,t.domain_id,r.group_id,d.group_desc,d.code_number from dispatch_group_dependency t inner join dispatch_batch_group_relation r on t.up_id = r.id inner join dispatch_group_define d on r.group_id = d.group_id where t.id = ?";
    public static String sys_rdbms_139 = "select distinct r.batch_id,d.arg_id,d.code_number,d.arg_desc,a.arg_value,a.uuid,d.bind_as_of_date,r.domain_id from dispatch_batch_group_relation r inner join dispatch_group_task_relation g on r.group_id=g.group_id inner join dispatch_task_argument_rel t on g.task_id = t.task_id inner join dispatch_argument_define d on t.arg_id = d.arg_id left join dispatch_batch_argument_rel a on a.batch_id = r.batch_id and a.arg_id = t.arg_id where d.arg_type = '4' and r.batch_id = ?";
    public static String sys_rdbms_140 = "update dispatch_batch_define set batch_status = ? where batch_id = ?";
    public static String sys_rdbms_141 = "update dispatch_task_argument_rel set sort_id = ? where uuid = ?";
    public static String sys_rdbms_142 = "delete from dispatch_task_argument_rel where uuid = ?";
    public static String sys_rdbms_143 = "select arg_id,arg_desc,arg_value,arg_type,domain_id from dispatch_argument_define where arg_id = ?";
    public static String sys_rdbms_144 = "insert into dispatch_task_argument_rel(uuid,task_id,arg_id,domain_id,arg_value,sort_id) values(uuid(),?,?,?,?,?)";
    public static String sys_rdbms_145 = "update dispatch_task_argument_rel set arg_value = ? where uuid = ?";
    public static String sys_rdbms_146 = "update dispatch_group_argument_rel set arg_value = ? where id = ? and arg_id = ?";
    public static String sys_rdbms_147 = "delete from dispatch_group_task_relation where id = ?";
    public static String sys_rdbms_148 = "insert into dispatch_group_task_relation(id,group_id,task_id,domain_id) values(?,?,?,?)";
    public static String sys_rdbms_149 = "insert into dispatch_group_argument_rel(uuid,id,arg_id,arg_value,domain_id) values(uuid(),?,?,?,?)";
    public static String sys_rdbms_150 = "select t.id,t.group_id,t.task_id,d.task_desc,t.domain_id from dispatch_group_task_relation t inner join dispatch_task_define d on t.task_id = d.task_id where t.group_id = ?";
    public static String sys_rdbms_151 = "insert into dispatch_task_dependency(uuid,id,up_id,domain_id) values(uuid(),?,?,?)";
    public static String sys_rdbms_152 = "delete from dispatch_task_dependency where uuid = ?";
    public static String sys_rdbms_153 = "delete from dispatch_group_dependency where uuid = ?";
    public static String sys_rdbms_154 = "insert into dispatch_batch_group_relation(id,batch_id,group_id,domain_id) values(?,?,?,?)";
    public static String sys_rdbms_155 = "delete from dispatch_batch_group_relation where id = ?";
    public static String sys_rdbms_156 = "insert into dispatch_group_dependency(uuid,id,up_id,domain_id) values(uuid(),?,?,?)";
    public static String sys_rdbms_157 = "select as_of_date from dispatch_batch_define where batch_id = ?";
    public static String sys_rdbms_158 = "insert into dispatch_batch_argument_rel(uuid,batch_id,arg_id,arg_value,domain_id) values(uuid(),?,?,?,?)";
    public static String sys_rdbms_159 = "select count(*) from dispatch_batch_argument_rel where batch_id = ? and arg_id = ?";
    public static String sys_rdbms_160 = "update dispatch_batch_argument_rel set arg_value = ? where batch_id = ? and arg_id = ?";
    public static String sys_rdbms_161 = "update dispatch_batch_define set as_of_date = ? where batch_id = ?";
    public static String sys_rdbms_162 = "select distinct uuid() as uuid,r.batch_id,d.arg_id,a.arg_value,r.domain_id,d.bind_as_of_date from dispatch_batch_group_relation r inner join dispatch_group_task_relation g on r.group_id=g.group_id inner join dispatch_task_argument_rel t on g.task_id = t.task_id inner join dispatch_argument_define d on t.arg_id = d.arg_id left join dispatch_batch_argument_rel a on a.batch_id = r.batch_id and a.arg_id = t.arg_id where d.arg_type = '4' and r.domain_id = ?";
    public static String sys_rdbms_163 = "select t.uuid,t.batch_id,t.arg_id,t.arg_value,t.domain_id from dispatch_batch_argument_rel t where t.domain_id = ? and t.batch_id = ?";
    public static String sys_rdbms_164 = "select distinct uuid() as uuid,r.batch_id,d.arg_id,a.arg_value,r.domain_id,d.bind_as_of_date from dispatch_batch_group_relation r inner join dispatch_group_task_relation g on r.group_id=g.group_id inner join dispatch_task_argument_rel t on g.task_id = t.task_id inner join dispatch_argument_define d on t.arg_id = d.arg_id left join dispatch_batch_argument_rel a on a.batch_id = r.batch_id and a.arg_id = t.arg_id where d.arg_type = '4' and r.domain_id = ? and r.batch_id = ?";
    public static String sys_rdbms_165 = "select batch_id,code_number,batch_desc,batch_status, as_of_date,domain_id,ret_msg,start_date, complete_date, end_date from dispatch_batch_define where domain_id = ? and batch_status = '1'";
    public static String sys_rdbms_166 = "delete from dispatch_batch_job_status where batch_id = ?";
    public static String sys_rdbms_167 = "insert into dispatch_batch_job_status(batch_id,job_id,status,gid,tid) values(?,?,?,?,?)";
    public static String sys_rdbms_168 = "update dispatch_batch_job_status set status = ? where batch_id = ? and job_id = ?";
    public static String sys_rdbms_169 = "select status from dispatch_batch_job_status t where batch_id = ? and job_id = ?";
    public static String sys_rdbms_170 = "select count(*) from dispatch_batch_job_status t where batch_id = ?";
    public static String sys_rdbms_171 = "select count(*) from dispatch_batch_job_status t where batch_id = ? and status = '2'";
    public static String sys_rdbms_172 = "delete from dispatch_batch_group_status where batch_id = ?";
    public static String sys_rdbms_173 = "insert into dispatch_batch_group_status(batch_id,gid,status) values(?,?,?)";
    public static String sys_rdbms_174 = "update dispatch_batch_group_status set status = ? where batch_id = ? and gid = ?";
    public static String sys_rdbms_175 = "select status from dispatch_batch_group_status where batch_id = ? and gid = ?";
    public static String sys_rdbms_176 = "update dispatch_batch_define set as_of_date = ?, batch_status = '1',start_date = now(), ret_msg = null, end_date = null where batch_id = ? and complete_date >= ? and batch_status = '2'";
    public static String sys_rdbms_177 = "select count(*) from dispatch_batch_group_status where batch_id = ? and status = '2'";
    public static String sys_rdbms_178 = "update dispatch_batch_define set batch_status = '1',start_date = now(), ret_msg = null, end_date = null where batch_id = ? and complete_date >= as_of_date";
    public static String sys_rdbms_179 = "update dispatch_batch_define set ret_msg = ? , end_date = now(), batch_status = ? where batch_id = ?";
    public static String sys_rdbms_180 = "update dispatch_batch_define set batch_status = '4' where batch_status = '1'";
    public static String sys_rdbms_181 = "select config_id,config_desc,config_value,image,details from dispatch_batch_system_config";
    public static String sys_rdbms_182 = "select t.config_value from dispatch_batch_system_config t where t.config_id = ?";
    public static String sys_rdbms_183 = "select c.config_value from dispatch_batch_domain_config c where c.domain_id = ? and c.config_id = ?";
    public static String sys_rdbms_184 = "select count(*) from dispatch_batch_domain_config where uuid = ?";
    public static String sys_rdbms_185 = "update dispatch_batch_domain_config set config_value = ? where uuid = ?";
    public static String sys_rdbms_186 = "insert into dispatch_batch_domain_config(config_id,config_value,domain_id,uuid) values(?,?,?,?)";
    public static String sys_rdbms_187 = "select config_id,config_value,domain_id from dispatch_batch_domain_config where domain_id = ?";
    public static String sys_rdbms_188 = "update dispatch_batch_group_status set start_time = now(),status = ? where gid = ? and batch_id = ?";
    public static String sys_rdbms_189 = "update dispatch_batch_group_status set end_time = now(),status = ? where gid = ? and batch_id = ?";
    public static String sys_rdbms_190 = "update dispatch_batch_job_status set start_time = now(), status = ? where batch_id = ? and job_id = ?";
    public static String sys_rdbms_191 = "update dispatch_batch_job_status set end_time = now(), status = ? where batch_id = ? and job_id = ?";
    public static String sys_rdbms_192 = "insert into dispatch_batch_history(uuid,code_number,batch_id,batch_desc,batch_status,as_of_date,start_time,end_time,ret_msg,domain_id) select ?,code_number,batch_id,batch_desc,batch_status,as_of_date,start_date,end_date,ret_msg,domain_id from dispatch_batch_define where batch_id = ?";
    public static String sys_rdbms_193 = "select t.uuid,t.code_number,t.batch_id,t.batch_desc,t.batch_status,a.batch_status_desc,t.as_of_date,t.start_time,t.end_time,t.ret_msg,t.domain_id from dispatch_batch_history t inner join dispatch_batch_status_attr a on t.batch_status = a.batch_status where t.domain_id = ?";
    public static String sys_rdbms_194 = "delete from dispatch_batch_history where uuid = ?";
    public static String sys_rdbms_195 = "insert into dispatch_batch_group_history(id,gid,status,start_time,end_time) select ?,gid,status,start_time,end_time from dispatch_batch_group_status where batch_id = ?";
    public static String sys_rdbms_196 = "insert into dispatch_batch_job_history(id,job_id,status,start_time,end_time,gid,tid) select ?,job_id,status,start_time,end_time,gid,tid from dispatch_batch_job_status where batch_id = ?";
    public static String sys_rdbms_197 = "select t.id,t.gid,t.status,t.start_time,t.end_time,d.batch_status_desc as status_desc,g.group_id,e.group_desc from dispatch_batch_group_history t inner join dispatch_batch_group_relation g on t.gid = g.id inner join dispatch_group_define e on g.group_id = e.group_id left join dispatch_batch_status_attr d on t.status = d.batch_status where t.id = ?";
    public static String sys_rdbms_198 = "select count(*) from dispatch_batch_job_history where id = ? and gid = ?";
    public static String sys_rdbms_199 = "select count(*) from dispatch_batch_job_history where id = ? and gid = ? and status = '2'";
    public static String sys_rdbms_200 = "select t.id,t.job_id,t.status,t.start_time,t.end_time,t.gid,t.tid,a.batch_status_desc as status_desc,td.task_id,td.task_desc,td.task_type,c.task_type_desc from dispatch_batch_job_history t left join dispatch_batch_status_attr a on t.status = a.batch_status inner join dispatch_group_task_relation o on t.tid = o.id inner join dispatch_task_define td on o.task_id = td.task_id inner join dispatch_task_type_attr c on td.task_type = c.task_type where t.id = ? and t.gid = ?";
    public static String sys_rdbms_201 = "select t.batch_id,t.gid,t.status,t.start_time,t.end_time,d.batch_status_desc as status_desc,g.group_id,e.group_desc from dispatch_batch_group_status t inner join dispatch_batch_group_relation g on t.gid = g.id inner join dispatch_group_define e on g.group_id = e.group_id left join dispatch_batch_status_attr d on t.status = d.batch_status where t.batch_id = ?";
    public static String sys_rdbms_202 = "select count(*) from dispatch_batch_job_status where batch_id = ? and gid = ?";
    public static String sys_rdbms_203 = "select count(*) from dispatch_batch_job_status where batch_id = ? and gid = ? and status = '2'";
    public static String sys_rdbms_204 = "select t.batch_id,t.job_id,t.status,t.start_time,t.end_time,t.gid,t.tid,a.batch_status_desc as status_desc,td.task_id,td.task_desc,td.task_type,c.task_type_desc from dispatch_batch_job_status t left join dispatch_batch_status_attr a on t.status = a.batch_status inner join dispatch_group_task_relation o on t.tid = o.id inner join dispatch_task_define td on o.task_id = td.task_id inner join dispatch_task_type_attr c on td.task_type = c.task_type where t.batch_id = ? and t.gid = ?";
    public static String sys_rdbms_205 = "select t.batch_id,t.gid,t.status,t.start_time,t.end_time,d.batch_status_desc as status_desc,g.group_id,e.group_desc from dispatch_batch_group_status t inner join dispatch_batch_group_relation g on t.gid = g.id inner join dispatch_group_define e on g.group_id = e.group_id left join dispatch_batch_status_attr d on t.status = d.batch_status where t.batch_id = ? and t.gid = ?";
    public static String sys_rdbms_206 = "select t.batch_id,t.job_id,t.status,t.start_time,t.end_time,t.gid,t.tid,a.batch_status_desc as status_desc,td.task_id,td.task_desc,td.task_type,c.task_type_desc from dispatch_batch_job_status t left join dispatch_batch_status_attr a on t.status = a.batch_status inner join dispatch_group_task_relation o on t.tid = o.id inner join dispatch_task_define td on o.task_id = td.task_id inner join dispatch_task_type_attr c on td.task_type = c.task_type where t.batch_id = ? and t.gid = ? and t.tid = ?";
    public static String sys_rdbms_207 = "insert into sys_handle_logs(uuid,user_id,handle_time,client_ip,status_code,method,url,data,domain_id) values(uuid(),?,now(),?,?,?,?,?,?)";
    public static String sys_rdbms_208 = "select t.code_number,t.role_name,t.role_owner as create_user,t.role_create_date as create_date,a.role_status_desc,a.role_status_id as role_status_code,t.domain_id,o.domain_name as domain_desc,t.role_maintance_date as modify_date,t.role_maintance_user as modify_user,t.role_id from sys_role_info t inner join sys_role_status_attr a on t.role_status_id = a.role_status_id inner join sys_domain_info o on t.domain_id = o.domain_id where t.role_id = ?";
    public static String sys_rdbms_209 = "select t.uuid, t.role_id, t.res_id, i.res_name,res_up_id from sys_role_resource_relat t left join sys_resource_info i on t.res_id = i.res_id where t.role_id = ?";
    public static String sys_rdbms_210 = "select batch_status,as_of_date,complete_date, pagging_freq,pagging_freq_mult from dispatch_batch_define where batch_id = ?";
}